﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BinaryTree
{
    class BubbleSort
    {
        public int[] GenerateBubbleSort(int[] values)
        {
            for (int i = 0; i < values.Length - 1; i++)
            {
                for (int j = i + 1; j < values.Length; j++)
                {
                    if (values[i] > values[j])
                    {
                        int n = values[j];
                        values[j] = values[i];
                        values[i] = n;
                    }
                }
            }

            return values;
        }
    }
}
